package net.println.kotlin.chapter3

class X

class A{
    var b = 0
        get() {
            println("get b")
            return field
        }
        set(value) {
            println("set b")
            field = value
        }
    lateinit var c: String
    lateinit var d: X
    val e: X by lazy {
        println("init X")
        X()
    }

    var cc:String? = null
}

fun main(args: Array<String>) {
    println("start")
    val a = A()
    println("init a")
    println(a.b)
    println(a.e)

    val hello = Hello(3,5)
    hello.a
    hello.c
    hello.sayHello()
}

class Hello(var a:Int, b: Int) {
    var c: String = "hello"
    fun sayHello() {
        println("hello")
    }
}